<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>文章类型</title>
<link rel="shortcut icon" href="favicon.ico">

<link href="hmp/css/font-awesome.css?v=4.4.0" rel="stylesheet">
<link href="hmp/css/animate.css" rel="stylesheet">
<link href="hmp/css/style.css?v=4.1.0" rel="stylesheet">
<link href="hmp/layui/layui/css/layui.css" rel="stylesheet">
<link href="hmp/editor.md-master/css/editormd.css" rel="stylesheet">

</head>
<body class="gray-bg">
	<!--第一层  数据展示 -->
	<div class="wrapper wrapper-content animated fadeInRight">
		<!-- Panel Other -->
		<div class="ibox float-e-margins">
			<div class="ibox-content">
				<div class="row row-lg">
					<!-- Example Events -->
					<div class="example-wrap">
						<div class="example">

							<div class="layui-tab">
								<ul class="layui-tab-title">
									<li class="layui-this">文章类型</li>
									<li>类型添加</li>
								</ul>
								<div class="layui-tab-content">
								
								
								<div class="layui-tab-item layui-show">
								
								
								</div>
								
								
									<div class="layui-tab-item ">
										<form class="layui-form" action="">
											<div class="layui-form-item">
												<label class="layui-form-label">文章类型</label>
												<div class="layui-input-block">
													<input type="text" name="typeName" id="title" required
														lay-verify="required" placeholder="文章类型"
														autocomplete="off" class="layui-input" style="width: 20%">
												</div>
											</div>

											<div class="layui-form-item">
												<label class="layui-form-label">类型序号</label>
												<div class="layui-input-block">
													<input type="text" name="sort" id="sort"  
														lay-verify="required" placeholder="类型序号"
														autocomplete="off" class="layui-input" style="width: 20%">
												</div>
											</div>

											<div class="layui-form-item">
												<div class="layui-input-block">
													<button class="layui-btn" lay-submit
														lay-filter="activeTypeForm">立即提交</button>
													<button type="reset" class="layui-btn layui-btn-primary">重置</button>
												</div>
											</div>
										</form>

									</div>
									
								</div>
							</div>

						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- 底层  占个坑  -->
	<div></div>

</body>

<!-- 全局js -->
<script src="hmp/js/jquery.min.js"></script>
<script src="hmp/js/bootstrap.min.js?v=3.3.6"></script>
<!-- 自定义js -->
<script src="hmp/js/content.js?v=1.0.0"></script>
<script src="hmp/layui/layui/layui.js"></script>
<script src="hmp/editor.md-master/editormd.min.js"></script>
<script>
	layui.use([ 'form', 'element' ], function() {
		var form = layui.form;
		var element = layui.element;

		//监听提交
		form.on('submit(activeTypeForm)', function(data) {
			//layer.msg(JSON.stringify(data.field));
			$.post("/activeType/save", data.field, function(result) {
				if (result.code == 200) {
					layer.alert(result.msg);
				} else {
					layer.alert(result.msg);
				}
			});
			return false;
		});
	});
</script>

</html>
